<div class="navbar navbar-inverse navbar-fixed-top">
  <div class="navbar-inner">
	<div class="container">
	  <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
		<span class="icon-bar"></span>
		<span class="icon-bar"></span>
		<span class="icon-bar"></span>
	  </button>
	  <a class="brand" href="<?php echo base_url('home') ?>">Grocery List</a>
	  <div class="nav-collapse collapse">
		<ul class="nav">
		  <li class="active"><a href="<?php echo base_url('home') ?>">Home</a></li>
		  <?php if($this->session->userdata('validated')){?>
		  <li><a href="<?php echo base_url('profile/view') ?>">My Profile</a></li>
		  <li><a href="<?php echo base_url('neighborhood/view') ?>">Markets</a></li>
		  <li><a href="">My Transactions</a></li>	  
		  <!--li class="dropdown">
			<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
			<ul class="dropdown-menu">
			  <li><a href="#">Action</a></li>
			  <li><a href="#">Another action</a></li>
			  <li><a href="#">Something else here</a></li>
			  <li class="divider"></li>
			  <li class="nav-header">Nav header</li>
			  <li><a href="#">Separated link</a></li>
			  <li><a href="#">One more separated link</a></li>
			</ul>
		  </li-->
		  <?php } ?>
		</ul>
		<?php 
		if(!$this->session->userdata('validated')){
		?>
		<form id="login_form" name="login" action="<?php echo base_url('api/auth/login');?>" method="post" class="navbar-form pull-right">
		  <input name="username" class="span2" type="text" placeholder="Username">
		  <input name="password" class="span2" type="password" placeholder="Password">
		  <button class="btn" type="submit">Signin</button>
		  <a href="<?php echo base_url('home/signup') ?>"><button class="btn"  type="button">Signup</button></a>
		</form>
		<?php 
		 } else {
		?>
		<div id="login_welcome" style="float:right;">
			<ul class="nav">
				<li id="logined_user"><a href="">Welcome <?php echo $this->session->userdata('user')->user->user_name." ".$this->session->userdata('user')->user->user_surname;?></a></li>
				<li><a href="<?php echo base_url('home/logout') ?>">Logout</a></li>
			</ul>
		</div>
		<?php 
		}
		?>
	  </div><!--/.nav-collapse -->
	</div>
  </div>
</div>
<script>
$(document).ready(function() {
});
</script>
